<?php $authItems = AuthItem::model()->findAll(array('order'=>'name')); ?>
<?php $authItemsList = CHtml::listData($authItems,'name', 'name'); ?>


<div class="form">
<?php echo CHtml::form(); ?>

    <?php echo CHtml::errorSummary($authItem); ?>

<input type="hidden" name="old_name" value="<?php echo $authItem->name ?>" />

<div class="row">
    <?php echo CHtml::activeLabel($authItem,'name'); ?>
    <?php echo CHtml::activeTextField($authItem,'name',array('size'=>50,'maxlength'=>64)); ?>
</div>
<div class="row">
    <?php echo CHtml::activeLabel($authItem,'type'); ?>
    <?php echo CHtml::activeDropDownList($authItem,'type',AuthItem::model()->typeOptions,array('size'=>3)); ?>
</div>
<div class="row">
    <?php echo CHtml::label('Parents','parents[]'); ?>
    <?php echo CHtml::dropDownList('parents[]', $itemParents,$authItemsList,array('multiple'=>'multiple','size'=>4)); ?>

</div>
<div class="row">
    <?php echo CHtml::activeLabel($authItem,'description'); ?>
    <?php echo CHtml::activeTextArea($authItem,'description',array('cols'=>50,'rows'=>3)); ?>
</div>
<div class="row">
    <?php echo CHtml::activeLabel($authItem,'bizrule'); ?>
    <?php echo CHtml::activeTextArea($authItem,'bizrule',array('cols'=>50,'rows'=>3)); ?>
</div>
<div class="row">
    <?php echo CHtml::activeLabel($authItem,'data'); ?>
    <?php echo CHtml::activeTextArea($authItem,'data',array('cols'=>50,'rows'=>3)); ?>
</div>
<div class="row">
    <?php echo CHtml::activeLabel($authItem,'createCRUDOperations'); ?>
    <?php echo CHtml::activeCheckbox($authItem,'createCRUDOperations'); ?>
</div>
<div class="row">
    <?php echo CHtml::activeLabel($authItem,'modelName'); ?>
    <?php echo CHtml::activeTextField($authItem,'modelName'); ?>
</div>

<div class="row action">
    <?php echo CHtml::submitButton($update ? _('Save') : _('Create'), array('name'=>'submitPost')); ?>
</div>

</form>
</div><!-- form -->
